package command;

import object.Commit;
import object.HEAD;
import utils.FileStatus;

import java.io.IOException;

import object.Branch;

public class BranchCommand {
   public Branch branch;

   public BranchCommand(String name)throws Exception{
       this.branch = new Branch(name);
   }


   public void excute() throws Exception{
       HEAD head = HEAD.deserialize();
       Commit commit = Commit.deserialize(head.getKey());
       this.branch.setCommit(commit);
       this.branch.writeObject();
   }
}